3.1.15 \(\int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^2} \, dx\) [15]

3.1.15.1 Optimal result
3.1.15.2 Mathematica [A] (verified)
3.1.15.3 Rubi [A] (verified)
3.1.15.4 Maple [A] (verified)
3.1.15.5 Fricas [F]
3.1.15.6 Sympy [F]
3.1.15.7 Maxima [F]
3.1.15.8 Giac [F]
3.1.15.9 Mupad [B] (verification not implemented)

3.1.15.1 Optimal result

Integrand size = 23, antiderivative size = 89 \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^2} \, dx=-a c^2 d^2 x-b c^2 d^2 x \arctan (c x)-\frac {d^2 (a+b \arctan (c x))}{x}+2 i a c d^2 \log (x)+b c d^2 \log (x)-b c d^2 \operatorname {PolyLog}(2,-i c x)+b c d^2 \operatorname {PolyLog}(2,i c x) \]

output
-a*c^2*d^2*x-b*c^2*d^2*x*arctan(c*x)-d^2*(a+b*arctan(c*x))/x+2*I*a*c*d^2*l 
n(x)+b*c*d^2*ln(x)-b*c*d^2*polylog(2,-I*c*x)+b*c*d^2*polylog(2,I*c*x)
 
3.1.15.2 Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.89 \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^2} \, dx=-\frac {d^2 \left (a+a c^2 x^2+b \arctan (c x)+b c^2 x^2 \arctan (c x)-2 i a c x \log (x)-b c x \log (c x)+b c x \operatorname {PolyLog}(2,-i c x)-b c x \operatorname {PolyLog}(2,i c x)\right )}{x} \]

input
Integrate[((d + I*c*d*x)^2*(a + b*ArcTan[c*x]))/x^2,x]
 
output
-((d^2*(a + a*c^2*x^2 + b*ArcTan[c*x] + b*c^2*x^2*ArcTan[c*x] - (2*I)*a*c* 
x*Log[x] - b*c*x*Log[c*x] + b*c*x*PolyLog[2, (-I)*c*x] - b*c*x*PolyLog[2, 
I*c*x]))/x)
 
3.1.15.3 Rubi [A] (verified)

Time = 0.30 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {5411, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^2} \, dx\)

\(\Big \downarrow \) 5411

\(\displaystyle \int \left (-c^2 d^2 (a+b \arctan (c x))+\frac {d^2 (a+b \arctan (c x))}{x^2}+\frac {2 i c d^2 (a+b \arctan (c x))}{x}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {d^2 (a+b \arctan (c x))}{x}-a c^2 d^2 x+2 i a c d^2 \log (x)-b c^2 d^2 x \arctan (c x)-b c d^2 \operatorname {PolyLog}(2,-i c x)+b c d^2 \operatorname {PolyLog}(2,i c x)+b c d^2 \log (x)\)

input
Int[((d + I*c*d*x)^2*(a + b*ArcTan[c*x]))/x^2,x]
 
output
-(a*c^2*d^2*x) - b*c^2*d^2*x*ArcTan[c*x] - (d^2*(a + b*ArcTan[c*x]))/x + ( 
2*I)*a*c*d^2*Log[x] + b*c*d^2*Log[x] - b*c*d^2*PolyLog[2, (-I)*c*x] + b*c* 
d^2*PolyLog[2, I*c*x]
 

3.1.15.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5411
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_ 
.)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f* 
x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p, 0] & 
& IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])
 
3.1.15.4 Maple [A] (verified)

Time = 0.79 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.26

method result size
parts \(a \,d^{2} \left (-c^{2} x +2 i c \ln \left (x \right )-\frac {1}{x}\right )+b \,d^{2} c \left (-c x \arctan \left (c x \right )+2 i \arctan \left (c x \right ) \ln \left (c x \right )-\frac {\arctan \left (c x \right )}{c x}-\ln \left (c x \right ) \ln \left (i c x +1\right )+\ln \left (c x \right ) \ln \left (-i c x +1\right )-\operatorname {dilog}\left (i c x +1\right )+\operatorname {dilog}\left (-i c x +1\right )+\ln \left (c x \right )\right )\) \(112\)
derivativedivides \(c \left (a \,d^{2} \left (-c x +2 i \ln \left (c x \right )-\frac {1}{c x}\right )+b \,d^{2} \left (-c x \arctan \left (c x \right )+2 i \arctan \left (c x \right ) \ln \left (c x \right )-\frac {\arctan \left (c x \right )}{c x}-\ln \left (c x \right ) \ln \left (i c x +1\right )+\ln \left (c x \right ) \ln \left (-i c x +1\right )-\operatorname {dilog}\left (i c x +1\right )+\operatorname {dilog}\left (-i c x +1\right )+\ln \left (c x \right )\right )\right )\) \(115\)
default \(c \left (a \,d^{2} \left (-c x +2 i \ln \left (c x \right )-\frac {1}{c x}\right )+b \,d^{2} \left (-c x \arctan \left (c x \right )+2 i \arctan \left (c x \right ) \ln \left (c x \right )-\frac {\arctan \left (c x \right )}{c x}-\ln \left (c x \right ) \ln \left (i c x +1\right )+\ln \left (c x \right ) \ln \left (-i c x +1\right )-\operatorname {dilog}\left (i c x +1\right )+\operatorname {dilog}\left (-i c x +1\right )+\ln \left (c x \right )\right )\right )\) \(115\)
risch \(\frac {i b \,d^{2} \ln \left (i c x +1\right )}{2 x}-b c \,d^{2}-\frac {i d^{2} b \ln \left (-i c x +1\right )}{2 x}+c \,d^{2} b \operatorname {dilog}\left (-i c x +1\right )+\frac {c \,d^{2} b \ln \left (-i c x \right )}{2}+2 i c \,d^{2} a \ln \left (-i c x \right )+\frac {i b \,c^{2} d^{2} \ln \left (i c x +1\right ) x}{2}-a \,c^{2} d^{2} x -\frac {i c^{2} d^{2} b \ln \left (-i c x +1\right ) x}{2}-\frac {d^{2} a}{x}-i c \,d^{2} a -b c \,d^{2} \operatorname {dilog}\left (i c x +1\right )+\frac {b c \,d^{2} \ln \left (i c x \right )}{2}\) \(179\)

input
int((d+I*c*d*x)^2*(a+b*arctan(c*x))/x^2,x,method=_RETURNVERBOSE)
 
output
a*d^2*(-c^2*x+2*I*c*ln(x)-1/x)+b*d^2*c*(-c*x*arctan(c*x)+2*I*arctan(c*x)*l 
n(c*x)-1/c/x*arctan(c*x)-ln(c*x)*ln(1+I*c*x)+ln(c*x)*ln(1-I*c*x)-dilog(1+I 
*c*x)+dilog(1-I*c*x)+ln(c*x))
 
3.1.15.5 Fricas [F]

\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^2} \, dx=\int { \frac {{\left (i \, c d x + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )}}{x^{2}} \,d x } \]

input
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))/x^2,x, algorithm="fricas")
 
output
integral(-1/2*(2*a*c^2*d^2*x^2 - 4*I*a*c*d^2*x - 2*a*d^2 - (-I*b*c^2*d^2*x 
^2 - 2*b*c*d^2*x + I*b*d^2)*log(-(c*x + I)/(c*x - I)))/x^2, x)
 
3.1.15.6 Sympy [F]

\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^2} \, dx=- d^{2} \left (\int a c^{2}\, dx + \int \left (- \frac {a}{x^{2}}\right )\, dx + \int b c^{2} \operatorname {atan}{\left (c x \right )}\, dx + \int \left (- \frac {b \operatorname {atan}{\left (c x \right )}}{x^{2}}\right )\, dx + \int \left (- \frac {2 i a c}{x}\right )\, dx + \int \left (- \frac {2 i b c \operatorname {atan}{\left (c x \right )}}{x}\right )\, dx\right ) \]

input
integrate((d+I*c*d*x)**2*(a+b*atan(c*x))/x**2,x)
 
output
-d**2*(Integral(a*c**2, x) + Integral(-a/x**2, x) + Integral(b*c**2*atan(c 
*x), x) + Integral(-b*atan(c*x)/x**2, x) + Integral(-2*I*a*c/x, x) + Integ 
ral(-2*I*b*c*atan(c*x)/x, x))
 
3.1.15.7 Maxima [F]

\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^2} \, dx=\int { \frac {{\left (i \, c d x + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )}}{x^{2}} \,d x } \]

input
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))/x^2,x, algorithm="maxima")
 
output
-a*c^2*d^2*x - 1/2*(2*c*x*arctan(c*x) - log(c^2*x^2 + 1))*b*c*d^2 + 2*I*b* 
c*d^2*integrate(arctan(c*x)/x, x) + 2*I*a*c*d^2*log(x) - 1/2*(c*(log(c^2*x 
^2 + 1) - log(x^2)) + 2*arctan(c*x)/x)*b*d^2 - a*d^2/x
 
3.1.15.8 Giac [F]

\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^2} \, dx=\int { \frac {{\left (i \, c d x + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )}}{x^{2}} \,d x } \]

input
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))/x^2,x, algorithm="giac")
 
output
sage0*x
 
3.1.15.9 Mupad [B] (verification not implemented)

Time = 0.65 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.58 \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^2} \, dx=\left \{\begin {array}{cl} -\frac {a\,d^2}{x} & \text {\ if\ \ }c=0\\ \frac {b\,d^2\,\left (c^2\,\ln \left (x\right )-\frac {c^2\,\ln \left (c^2\,x^2+1\right )}{2}\right )}{c}+b\,c\,d^2\,\left ({\mathrm {Li}}_{\mathrm {2}}\left (1-c\,x\,1{}\mathrm {i}\right )-{\mathrm {Li}}_{\mathrm {2}}\left (1+c\,x\,1{}\mathrm {i}\right )\right )+\frac {b\,c\,d^2\,\ln \left (c^2\,x^2+1\right )}{2}-\frac {a\,d^2\,\left (c^2\,x^2+1-c\,x\,\ln \left (x\right )\,2{}\mathrm {i}\right )}{x}-\frac {b\,d^2\,\mathrm {atan}\left (c\,x\right )}{x}-b\,c^2\,d^2\,x\,\mathrm {atan}\left (c\,x\right ) & \text {\ if\ \ }c\neq 0 \end {array}\right . \]

input
int(((a + b*atan(c*x))*(d + c*d*x*1i)^2)/x^2,x)
 
output
piecewise(c == 0, -(a*d^2)/x, c ~= 0, (b*d^2*(c^2*log(x) - (c^2*log(c^2*x^ 
2 + 1))/2))/c + b*c*d^2*(dilog(- c*x*1i + 1) - dilog(c*x*1i + 1)) + (b*c*d 
^2*log(c^2*x^2 + 1))/2 - (a*d^2*(c^2*x^2 - c*x*log(x)*2i + 1))/x - (b*d^2* 
atan(c*x))/x - b*c^2*d^2*x*atan(c*x))